package com.menggudf.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.menggudf.model.ResultModel;
import com.menggudf.service.SysCaseHistoryService;

@Controller
@RequestMapping("/sysCaseHistory")
public class SysCaseHistoryController {
    
    @Autowired
    SysCaseHistoryService sysCaseHistoryService;
    
    @RequestMapping("/getList")
    @ResponseBody
    public Map<String, Object> getList(
            @RequestParam(value="userName",required=false) String userName,
            @RequestParam("limit") int pageSize,
            @RequestParam("offset") int offset){
        return sysCaseHistoryService.getList(userName,pageSize,offset);
    }
    
    @RequestMapping("/editSysCaseHistoryActive")
    @ResponseBody
    public ResultModel editSysCaseHistoryActive(
            @RequestParam("active") String active,
            @RequestParam("id") int id){
        return sysCaseHistoryService.editSysCaseHistoryActive(id,active);
    }

}
